package com.service.impl;

import com.mapper.WhCgMappingMapper;
import com.pojo.WhCgMapping;
import com.service.WhCgMappingService;
import com.util.Pager;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service("whCgMappingService")
public class WhCgMappingServiceImpl implements WhCgMappingService {
    @Resource
    private WhCgMappingMapper whCgMappingMapper;
    @Override
    public Pager<WhCgMapping> searchPager(Pager<WhCgMapping> pager) {
        pager.setRows(whCgMappingMapper.searchPager(pager));
        pager.setTotal(whCgMappingMapper.total(pager));
        return pager;
    }

    @Override
    public int del(Integer id) {
        return whCgMappingMapper.del(id);
    }

    @Override
    public int update(WhCgMapping whCgMapping) {
        return whCgMappingMapper.update(whCgMapping);
    }

    @Override
    public int add(WhCgMapping whCgMapping) {
        return whCgMappingMapper.add(whCgMapping);
    }
}
